home *** CD-ROM | disk | FTP | other *** search
- #ifndef _XSHMTRANS_H_
- #define _XSHMTRANS_H_
- #define SGI_SHM_FILENAME "/usr/tmp/.Xshmtrans"
-
- typedef struct _connhdr {
- ulock_t clientlock; /* spinlock to single thread startup */
- usema_t *syncsema; /* semaphore for synchronization */
- usema_t *syncsema2; /* semaphore for synchronization */
- unsigned char *arenahdr; /* used for passing per/client arena */
- } connhdr_t;
-
- typedef struct _arenahdr {
- unsigned char *shmbuf; /* start of buffer */
- unsigned char *shmbufend; /* end of buffer */
-
- volatile int fullflag; /* buffer is full flag */
- volatile int emptyflag; /* buffer is empty flag */
-
- usema_t *fullsema; /* semaphore for full flag */
- usema_t *emptysema; /* semaphore for empty flag */
-
- ulock_t headlock; /* spinlock to protect head ptr */
- ulock_t taillock; /* spinlock to protect tail ptr */
-
- volatile unsigned char *headptr; /* head of valid data */
- volatile unsigned char *tailptr; /* tail of valid data */
- } arenahdr_t;
-
- typedef struct _shmdata {
- usptr_t *arena; /* shared arena */
- arenahdr_t *arenahdr; /* shared data structures */
- connhdr_t *connhdr; /* server connection header */
- unsigned char *curreqptr; /* pointer to start of current req. */
- unsigned char *reqendptr; /* pointer to end of current request */
- unsigned char *halfptr; /* pointer to end of current request */
- int pid;
- } shmdata_t;
- #endif /* _XSHMTRANS_H_ */
-